Assurance API
How to use the API
This page describes how different parts of the Assurance API operate, and how each part can be used.
For more information, refer to the RAML in Anypoint.
Overview
The Assurance API provides end-to-end fault diagnosis and problem management. This API calls all available details of your product instance up front to drive the workflow including service validation, fault diagnostics, outage correlation, and a process for booking appointments and submitting and updating problem reports.
In this section, learn about how to:
- Manage Subscriptions and Notifications
- Use Get Products
- Run Diagnostics
- Log a Problem Report
- Book an Appointment
- Manage Problem Reports
- Query Problem Reports
Manage Subscriptions and Notifications
The Assurance API includes the ability to set up subscriptions to be notified with updates to problem reports and events. A subscription URL is provided, or you can specify a target URL for delivery of notifications.
Subscriptions can be updated, deactivated or deleted.
Note: It is not possible to subscribe to receive notifications via webhooks and email at the same time.
Because of the asynchronous nature of problem report updates and status changes it may be helpful to subscribe to a notification instead of polling for updates.
There are three parts to this process:
- Submit a subscription request -
POST /subscribers
with a secret key and a destination URL, that is to be used to receive notifications. - Validate the webhook endpoint - API Support will work with you to ensure that you are receiving notifications correctly.
- Manage subscriptions - List, update, deactivate, or delete your subscriptions.
Submit a subscription request
POST /subscriptions
The Assurance API exposes an endpoint (POST /subscriptions
) to enable RSPs to subscribe for outbound notifications from Assurance on specified channels. The subscribing party uses the client authentication credentials supplied by Chorus using Basic Authentication.
The following table describes the attributes required to subscribe to a channel for notifications:
Attribute | Details | Type |
---|---|---|
channel | The channel to subscribe to, e.g. assure.events, fault.notification. | string |
subscriberName | Your subscriber name. This must be set up on Chorus' end before you can can subscribe. | string |
destinationURL | Webhook that notifications from Assurance are received. | string |
clientAuthenticationKey | A supplied key for verifying the subscription submitter. | string |
Validate the webhook endpoint
Once you post a submission request, our internal processes make the configuration changes. API Support will set up a time with you to test that you are receiving the updates correctly.
Note: Currently this is not an automated process.
Manage subscriptions
GET /subscriptions
GET /subscriptions/{subscriptionid}
PUT /subscriptions/{subscriptionid}
DELETE /subscriptions/{subscriptionid}
POST /subscriptions/{subscriptionid}/deactivate
Once a subscription has been created, you can manage it using the Update, Delete, and Deactivate functions.
The subscription functions are described in the following table:
Assurance API Aspect | How it works | Exceptions / scenarios and notes |
---|---|---|
Query subscriptions | Retrieves information of all subscriptions for the subscriber. | The list of subscriptions can be filtered using the channel parameter. |
Query subscription | Retrieves information for a specific subscription id. | |
Update subscription | Updates an existing subscription, e.g. to change the destination URL or name of application. | |
Delete subscription | Unsubscribe from receiving notifications for the subscription. | Use the Deactivate function to keep the subscription but stop receiving notifications. Note: If you delete a subscription you will need to follow the Submit a subscription request process above to recreate it. |
Deactivate subscription | Stop receiving notifications but keep the subscription set up. | Use the Update function to reactivate the subscription. |
Notification types
The following table lists the properties present in all notification types across all channels:
Property | Type | Description |
---|---|---|
notificationId | UUID | The unique identifier for the notification. |
channel | string | The channel the notification is posted to, e.g. fault.notification. |
status | string | The lifecycle status of the notification, e.g. DELIVERED. |
destinationURL | string | The target URL to deliver the notification, if not being sent to your application's subscription URL. |
groupKeyType | string | The grouping key type to ensure ordering of related requests. |
groupKeyValue | string | The grouping key value to ensure ordering of related requests. |
subscriberName | string | The name for the subscriber, i.e. the application name when subscribing for notifications. |
retryCount | number | The number of retries remaining to send the notification. |
includedMetadata | string | Additional metadata supplied by the subscriber for internal subscriber use. |
createdAt | string | Datetime the notification was created. |
updatedAt | string | Datetime the notification was last updated. |
payload | notification object | The payload of the notification. The contents depend on the type of notification, as described below. |
ProblemReportNotification
The ProblemReportNotification object is used to send a status change update notifications. Typical use cases are event-based handling of Problem Report changes.
The following table lists the properties of a ProblemReportNotification object:
Property | Type | Description |
---|---|---|
createDate | string | Datetime the problem report was created. |
scheduleDate | string | Datetime the problem report was scheduled for workforce activities. |
problemNumber | string | The unique identifier assigned to the problem report by Chorus. |
status | string | Status of the problem report. |
serviceProviderId | string | System identifier of the RSP that raised the problem report. |
serviceProviderProblemNumber | string | Identifier supplied by the prolem report submitter at the time of submission. |
description | string | A freetext description used to provide additional information or further context about the problem report. |
notificationType | string | The type of notification for the problem report. |
notificationSubType | string | The sub-type of notification for the problem report. |
problemResolution | ProblemResolution | Object representing the resolution of the problem, including found, cause and action aspects, as well as a description and date of the resolution. |
appointments | Appointment[] | An array of Appointments for the workforce activities, including from and to windows, and commitment types. |
contacts | object | Set of contacts involved in the problem report. Used for liaising and communicating with Chorus and Service Companies. |
See the ProblemReportNotification payload property in the API Specification for further details.
DiagnosticSessionNotification
The DiagnosticSessionNotification object contains the details of a diagnostic session.
The following table lists the properties of a DiagnosticSession object:
Property | Type | Description |
---|---|---|
identifier | UUID | The unique identifier for the diagnostic session. |
organisation | string | The name of the organisation that initiated the diagnostic session. |
organsiationGroup | string | The name of the organisation group that initiated the diagnostic session. |
productId | string | The product identifier or ASID that uniquely identifies this product or service instance. |
productType | string | The name of the product type, e.g. EUBA. |
status | string | The current state of the diagnostic session, e.g. CREATED, WAIT_FOR_DEFAULT_DIAGNOSTICS, RAISE_FAULT, VIEW_REPORT, COMPLETED, etc. |
tag | string | Free text used for reporting/filtering/identification. |
initiator | string | The system or end user that initiated the diagnostic session. |
initiatorReference | string | The context of the intiator with a specific reference, e.g. RSP supplied identifier. |
recommendedNextStep | string | The next step that should be taken in the diagnostic processes, e.g. PROVIDE_FAULT_TYPES, INITIATE_ADDITIONAL_PRODUCT_DIAGNOSTICS, etc. |
diagnosticSummary | string | Summary description of the diagnostics, e.g. DIAGNOSTICS_RUNNING, NO_DIAGNOSTICS, etc. |
lastStep | string | The last step that was taken, e.g. RAISE_FAULT |
faultTypes | string[] | The selected fault types for the diagnostic session with the select fault types request, includes the fault types previously submitted using the select fault type request. |
restrictedFaultTypes | FaultType[] | The list of restricted fault types available for selection for the diagnostic session with the select fault type request. Filtered based on the results of diagnostic test execution and used for validation of the select fault types submission. |
options | Options | Options and modifiers for the diagnostic sesssion that can be used to alter presentation and processing. |
problemNumber | string | The problem report number once a Submit Problem Report for a given session is completed. |
createdDate | string | Datetime the session was created. |
updatedDate | string | Datetime the session was updated. |
product | Product | Extended product details for the product or service instance under diagnosis. |
questions | Question[] | Set of filtered questions for the diagnostic session that must be supplied in any subsequent problem report submission. |
diagnostics | Diagnostic[] | Set of diagnostics created during the diagnostic session. |
reservations | ReservationResponse | Reservations made and currently present for the diagnostic session. |
See the DiagnosticSessionNotification payload property in the API Specification for further details.
Use Get Products
GET /products/{productid}
The Get Product API call returns product information.
Get Product queries Chorus inventories including the Chorus address database, product inventories, and problem reports to retrieve all available information for the Product Identifier supplied. The response depends on the type of product, and whether Chorus holds full inventory.
Note: For more information about the different product types, see also Product Details.
The steps required to retrieve product information are described in the following table:
Step | Role | Action | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1. | API Consumer | Get Product | Call Assurance API `GET /products/{productid}` method using a Chorus product identifier. | ||||||||
2. | Assurance API | Validate Service |
The API validates the service including if the service is active and if it is owned by the initiating RSP (or sub-entity). If the service is inactive, then an API error response is returned. If the requestor is not authorised to access the information, then an API error response is returned. If the API consumer has entered an invalid identifier, then an API error response is returned. |
||||||||
3. | Assurance API | Query inventory |
The API queries inventory for Product Service Details. If the product is validated, then where we hold full details of your product instance in our inventory, all information is returned. If the product is partially validated, then where we hold partial details of your product instance in our inventory, the information we have available is returned. If the product is unvalidated, then where the product type is unavailable in our inventory and we are unable to validate the product, the Product Types Possible list is also returned. Details include:
|
||||||||
4. | Assurance API | Query inventory | The API returns details applicable to the type of service:
|
||||||||
5. | Assurance API | Query address / orders / problem reports |
The API queries other inventories to return additional information available for the product instance to support fault diagnosis and resolution.
|
Run Diagnostics
POST /sessions
The POST /sessions
API call enables the initiation of a diagnostic session. The Assurance API runs the default test(s) and returns results applicable to the product type submitted, where available.
Where a product is unvalidated, the product type must be specified when posting a diagnostic.
Where no default test exists for the product type, then other factors such as any open problems are used to diagnose the fault.
Because of the asynchronous nature of the diagnostics, the time it takes to run a diagnostic depends on two factors:
- Time for the Diagnostic API to respond. The Diagnostic API should respond within 4-10 seconds.
Time for the actual test to complete running. This time depends on the type of test. Indicative average times for each test are:
- ONT Status, 10 seconds or less
- Single Line Test, 32 seconds or less
- Line State Diagnosis, takes 15 seconds or less
- Electrical Test, 50 seconds or less.
Based on these average response times, polling for a result should be set at a frequency of no less than 10 second intervals or alternatively subscribe to be notified when the diagnostic results are ready. See Manage Subscriptions and Notifications.
- Diagnostics sessions timeout after one hour of update inactivity on the session.
- It is possible to cancel a diagnostic using the Cancel Diagnosis API call. This call should only be used if incorrect information such as an incorrect product type has been submitted when posting the diagnostic.
- A diagnostic session concludes with the return of a fault type and associated next steps that can be used in the submission of a problem report.
The table below describes the diagnostic process:
Step | Role | Action | Description |
---|---|---|---|
1. | API Consumer | Submit a diagnostic request / Post Diagnosis (Initiate Diagnostics Session) |
The Post Diagnosis API call / request initiates default diagnosis action for the product type. For unvalidated services, the product type is required in the request. |
2. | Assurance API | Return diagnostic |
The Assurance API returns:
|
3. | Assurance API | Run diagnostic |
The Assurance API runs the default test applicable to the product type submitted and query open problem reports, to assist with fault diagnosis. Note: Diagnostics sessions timeout after one hour of update inactivity on the session. |
4. | API Consumer | Retrieve a diagnostic | Use the diagnostic session identifier to retrieve the results of a diagnostic. |
5. | API Consumer | Determine next step |
The API consumer determines and decides the next step.
|
Log a Problem Report
POST /sessions/{sessionid}/problemReport
The POST /sessions/{sessionid}/problemReport
API call enables an API consumer to submit a problem report into the Chorus ITSM tool.
Note: Diagnostics must be completed before submitting a problem report and submitting a problem report triggers the completion of the diagnostic session.
Problem report submission includes completing appointment details where required, and answering standard questions. Non-standard questions also need to be supplied in a problem report submission to ensure Chorus has all supporting information to aid the resolution process.
The table below describes the problem report logging process:
Step | Role | Action | Description |
---|---|---|---|
1. | API consumer | Post Fault Type | Problem report submission starts with the API consumer posting a fault type. |
2. | Assurance API | Return Problem Submission details | Depending on the product and fault types posted, the Assurance API returns all the details required for submission of a problem report including the applicable question sets. |
3. | API consumer | Book Appointment | If an appointment is required, then the API consumer follows the Book Appointment flow. |
4. | API consumer | POST Problem Report | The POST Problem Report API call enables the API consumer to submit a problem report. This results in the submission of a problem report into the Chorus ITSM tool and completion of the diagnostic session. |
5. | Assurance API | Return Problem Report Details | The Assurance API returns problem report details. |
6. | API Consumer | Get Problem Report | The Get Problem Report API call enables an API consumer to retrieve a full problem report. Provides details of a specific problem report and any updates that have been made during its lifecycle. |
Book Appointment
GET /sessions/{sessionid}/schedule
POST /sessions/{sessionid}/reservations
The GET /sessions/{sessionid}/schedule
call queries the Chorus workforce management source to return details of available appointments for products / fault types that require a booking with a service company technician.
SLA times
Appointment availability is based on the SLAs associated with the product group and fault type, and the availability of technicians with the required skill set. Available timeslots are returned by the API based on the product instance.
When querying timeslots, the following availability rules apply:
SLA time | Availability |
---|---|
2 hours | 2 hour SLA times are only available for selected products, work divisions and service areas. Fibre and data products: - 04 - Chorus Fibre - 05 - Chorus Data Work divisions: - NGA Enhanced (UE) - NGA Failed Install (UI) - NGA Premise (UP) - Data (DT) Major service areas: - Auckland - Dunedin - Napier/Hastings - Palmerston North - Wellington. Notes: - Some Customer Service Areas (CSA) within the included major service areas may remain as 4 hour SLA areas. - If the booking system lacks capacity within the appointment window, the 2 hour window will not be available, and 4 hour appointment windows will become the default option. - Appointment windows are not available for unvalidated products. |
4 hours | Available for all relevant products, work divisions and service areas where designated, or where there are no 2 hour SLA timeslots available. |
Booking types
The two booking types are described in the table below:
Type | Description |
Confirmed appointment (look and book) |
The look and book confirmed appointments are only available for layer 1 UCLL products including SLES, SLU MPF and UCLL MPF. Confirmed appointments use the enumeration BET. |
ASAP |
ASAP (earliest available appointment) is available for all products. If no appointment type is specified, the ASAP slot is automatically assigned. ASAP is the only option available for layer 1 non-UCLL products.
|
The table below describes the process for booking an appointment:
Step | Role | Action | Description |
---|---|---|---|
1. | API Consumer | Get Schedule | Use the Get Schedule API call to retrieve a schedule. The API consumer must specify the work division and either the Exchange ID for layer 2 products or the TLC for layer 1 products. |
2. | Assurance API | Return Schedule | The Assurance API will return the applicable schedule. |
3. | API Consumer | Post Reservation | Post a Reservation. Use the enumeration BET. |
4. | Assurance API | Return Reservation | The Assurance API will return details based on the type of reservation. If confirmed Reservation, then a confirmation and reservation ID is returned. |
Manage Problem Reports
POST /problemReports/{problemnumber}/update
PUT /problemReports/{problemnumber}
POST /problemReports/{problemnumber}/close
POST /problemReports/{problemnumber}/cancel
Once a problem report has been logged with Chorus, you can manage the problem using the Update, Amend, Close and Cancel functions.
Note: Problem Report payloads vary between products.
The Problem Report functions are described in the following table:
Assurance API Aspect | How it works | Exceptions / scenarios and notes |
---|---|---|
Update Problem Report | Enables an API consumer to update a problem report. This call appends progress updates to the problem report. | Problem reports with a status of closed can’t be updated. |
Amend Problem Report | Enables an API consumer to amend the editable details originally submitted in a problem report. | This is different to updating a problem report that provides a journal update of activity. Problem reports with a status of closed can’t be amended. |
Close Problem Report | Enables an API consumer to close a problem report if the problem status is Service Given. | An RSP can only close a problem report when the status is Service Given. Problem reports auto-close within 48 hours of Service Given. The close problem report call is optional. |
Cancel Problem Report | Enables an API consumer to submit a cancellation request for a problem report. Depending on the status and history of the problem report the report will either be: - Cancelled automatically - Referred to our Assure team for review and manual cancellation - Rejected | n/a |
Query Problem Reports
GET /problemReports
The GET /problemReports
call queries for up to 12 months of historical problem reports, and return results based on selected input criteria.
For each field, you can specify a sort order, ascending or descending. Results are paginated with a maximum of 50 records per page.
Assurance API Aspect | How it works | Exceptions / scenarios and notes |
---|---|---|
Query Problem Reports | Enables an API consumer to query problem reports using the following input criteria: - status - closureCode - serviceProviderProblemNumber - updateDate - createDate - productId - notStatus | |
Query Problem Reports status | Returns all Problem Reports with the Problem Report status or statuses specified (comma delimited). | Displays as ProblemReport Status. Status types are: - Open - Accepted - Request for information - Pending cancel - Assigned - Scheduled - In progress - Service Given - Completed - Closed |
Query Problem Reports closureCode | Returns all Problem Reports with the specified impact value. | Displays as ProblemReport Closure / Status Reason. |
Query Problem Reports serviceProviderProblemNumber | Returns all ProblemReports related to the customer reference. | Displays as Customer Reference. |
Query Problem Reports updateDate | Returns all Problem Reports with the specified Last Updated Date. | Expects yyyy-MM-ddTHH-mm-ss format. Displays as ProblemReport Last Updated Date. |
Query Problem Reports createDate | Returns all Problem Reports with the specified Created Date. | Expects yyyy-MM-ddTHH-mm-ss format. Displays as ProblemReport Created Date. |
Query Problem Reports productId | Returns all Problem Reports related to the service number / service identifier. | |
Query Problem Reports notStatus | Returns all Problem Reports without the Problem Report status or statuses specified (comma delimited). | Displays as ProblemReport Status. |
Query Problem Reports sort | Sort results by one or multiple named fields and for each field specify ascending or descending order. Use a colon to specify the sort order. | (ProductId, productTypeId, problemNumber, serviceProviderProblemNumber, status, createDate, updateDate, scheduleDate). |
View Event Notifications
GET /events/{event_id}
GET /events/{event_id}/impact
You can view event notifications for all planned and unplanned Chorus network events, for all of your Chorus services.
The objects returned for events and the information returned are described in the following table.
Assurance API Aspect | How it works | What it can be used for |
---|---|---|
View Events | Queries the network events repository and returns details of future planned, current and recent planned and unplanned Chorus events. | Use as a single source for all Chorus future planned, current and recent planned and unplanned event information. |
View Event Impacts | Queries the network events repository and returns details of future planned, current and recently planned and unplanned Chorus events mapped to Chorus products. View event impacts and match impacted services to your customers, along with inbound interactions. | Use this to match events to impacted services to your customers, along with inbound interactions. This allows you to pro-actively manage outages and your customers' expectations more effectively with the goal of reducing unnecessary calls into your operational teams. |